// logs.js
const util = require('../../utils/util.js')

Page({
  data: {
    logs: []
  },
  onLoad() {
    console.log('logs onLoad')
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(log => {
        return {
          date: util.formatTime(new Date(log)),
          timeStamp: log
        }
      })
    })
  },
  onShow() {
    console.log('logs onShow')
  },
  onReady() {
    console.log('logs onReady')
  },
  onHide() {
    console.log('logs onHide')
  },
  onUnload() {
    console.log('logs onUnload')
  },
})
